package com.cjlgb.design.upms.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.cjlgb.design.common.mybatis.bean.BaseEntity;
import com.cjlgb.design.common.core.util.TreeUtil;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author WFT
 * @date 2019/7/31
 * description: 系统菜单
 */
@Setter
@Getter
public class SysMenu extends BaseEntity implements TreeUtil.Tree<SysMenu> {

    /**
     * 菜单名称
     */
    private String name;

    /**
     * 权限标识
     */
    private String permission;

    /**
     * 图标
     */
    private String icon;

    /**
     * 前端页面路径
     */
    private String path;

    /**
     * 排序字段
     */
    private Integer sort;

    /**
     * 父级菜单Id
     */
    private Long pid;

    /**
     * 类型：{ 1：模块，2：菜单，3：按钮 }
     */
    private Integer type;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 最后修改时间
     */
    private LocalDateTime lastModifyTime;

    /* -------------------------------------------------------------------------------------------------------------- */

    /**
     * 子节点列表
     */
    @TableField(exist = false)
    private List<SysMenu> children;

}
